SlideShare a Scribd company logo
RespClient
Minimal Redis Client for PowerShell
2014/07/12
Yoshifumi Kawai - @neuecc
Self Introduction
@仕事
株式会社グラニ 取締役CTO
C# 5.0 + .NET Framework 4.5 + ASP.NET MVC 5
最先端C#によるハイパフォーマンスWebアプリケーション
@個人活動
Microsoft MVP for Visual C#
Web http://neue.cc/
Twitter @neuecc
linq.js - http://linqjs.codeplex.com/ とか作ってます
Redis/RESP
REmote DIctionary Server/REdis Serialization Protocol
About Redis
インメモリKey-Valueストア
KVS系では現在、最も人気が高い
単純なKey-Valueの他にListやSetなど多様なデータ型が使える
リモート上のデータ構造という、いい具合のサイズ感が魅力
Windowsでも動く
MicrosoftがforkしたWindowsバイナリあり
AWSやAzureがManagedなCacheServerとして正式提供
それを受けてMicrosoftがASP.NET用のSessionProviderを公開したり
Windowsでも、間違いなく標準的
なKVSとなっていくだろう
About RESP
Redis SErialization Protocol
http://redis.io/topics/protocol
Redisのプロトコル、どういうバイナリ送れば実行されるか
Simple to implement.
Fast to parse.
Human readable.
かなりシンプル
public enum RespType : byte
{
SimpleStrings = (byte)'+',
Erorrs = (byte)'-',
Integers = (byte)':',
BulkStrings = (byte)'$',
Arrays = (byte)'*'
}
C#で先頭識別子の定義すると
こんな感じになる、簡単そう?
RespClient
minimal RESP(REdis Serialization Protocol) client for PowerShell
RespClient
シンプルなPowerShell用Redisライブラリ
https://github.com/neuecc/RespClient
現在はNuGetで配ってます。が、PowerShellGet?よくわからな
いけれどぎたぱそ先生がなんかいい具合に配ってくれるでしょ
ういつかきっとおそらく
非依存・コマンドレット提供
自前でプロトコル解釈してるので外部ライブラリ不要
コマンドレットを完備してる唯一の.NET用Redisライブラリ
Why RespClient?
.NET用Redisクライアントは幾つかある
特にRedis/C#についてはBuildInsiderに書いたので読んでね
http://www.buildinsider.net/small/rediscshap/01
が、.NET用は基本C#用でPowerShell用ではない
使い心地がヘヴィで、PowerShellで使いやすくない
redis-cli的な、PowerShellネイティブなクライアントが欲しい
というわけで、自分で作った(但し実装は(当然)C#)
PowerShellからWindowsのRedisもLinuxのRedisも管理できる
Demo...
Connect/Send-Command with RespClient
How to use : Commandlet
# モジュールはdllで提供されているので読み込む
Import-Module RespClient.dll
# RedisServerへの接続。
# ConnectionはPowerShellのセッションが有効な間繋がりっぱなしになる。
# 他にオプションとして-Host, -Port, -Timeout
Connect-RedisServer 127.0.0.1
# 繋がったコネクションでコマンドを送る
Send-RedisCommand "set test 100"
Send-RedisCommand "get test"
Send-RedisCommand "incr test"
# PowerShellなのでパイプラインで送れるのが強み!
@(1,2,3) | % { Send-RedisCommand "incrby test $_" }
# 明示的に切る場合はDisconnectコマンドを
Disconnect-RedisServer
Conclusion
まとめ
Redis is very very important!
これからのWeb開発でRedis知らないのはありえない
Windowsにおいてもそれは変わらない
管理するならば?
やはりPowerShellで行いたい!RespClient!
http://neue.cc/2014/03/11_447.html ←紹介記事
もちろんWindowsで動くRedisだけじゃなく、Linuxで動くRedis
にも繋がってPowerShellで自由に操作可能です

More Related Content

PDF
LightNode - Micro RPC/REST Framework
PDF
C#の強み、或いは何故PHPから乗り換えるのか
PDF
AWS + Windows(C#)で構築する.NET最先端技術によるハイパフォーマンスウェブアプリケーション開発実践
PDF
The History of LINQ
PDF
LINQPad with LINQ to BigQuery - Desktop Client for BigQuery
PDF
.NET最先端技術によるハイパフォーマンスウェブアプリケーション
PDF
The History of Reactive Extensions
PDF
Introduction to NotifyPropertyChangedGenerator
LightNode - Micro RPC/REST Framework
C#の強み、或いは何故PHPから乗り換えるのか
AWS + Windows(C#)で構築する.NET最先端技術によるハイパフォーマンスウェブアプリケーション開発実践
The History of LINQ
LINQPad with LINQ to BigQuery - Desktop Client for BigQuery
.NET最先端技術によるハイパフォーマンスウェブアプリケーション
The History of Reactive Extensions
Introduction to NotifyPropertyChangedGenerator

What's hot (20)

PDF
イケてる技術で品質を担保しつつスピード感のある開発を実現する冴えたやり方
PDF
An Internal of LINQ to Objects
PDF
VSCodeで始めるAzure Static Web Apps開発
PDF
Implements OpenTelemetry Collector in DotNet
PDF
True Cloud Native Batch Workflow for .NET with MicroBatchFramework
PDF
Pythonで始めるWebアプリケーション開発
PDF
第9回rest勉強会 ダウンロード・アップロード編
PDF
Metaprogramming Universe in C# - 実例に見るILからRoslynまでの活用例
PDF
.NET Core 5 ~ Windows, Linux, OS X そして Docker まで ~
PDF
MagicOnion~C#でゲームサーバを開発しよう~
PDF
Unityによるリアルタイム通信とMagicOnionによるC#大統一理論の実現
PPTX
Idcfクラウド 初心者の事始め(2)資料
PDF
The Next Generation for C# Developers
PDF
Bicep + VS Code で楽々Azure Deploy
PDF
UniRx - Reactive Extensions for Unity
PDF
asm.jsとWebAssemblyって実際なんなの?
PDF
デモで楽しむ Visual Studio 2022 & .NET 6 最新アップデート
PDF
Linux & Mac OS でも動く! ~ オープンソース & クロスプラットフォーム .NET の歩き方 ~
PDF
The Twelve-Factor (A|M)pp with C#
PDF
emscriptenでC/C++プログラムをwebブラウザから使うまでの難所攻略
イケてる技術で品質を担保しつつスピード感のある開発を実現する冴えたやり方
An Internal of LINQ to Objects
VSCodeで始めるAzure Static Web Apps開発
Implements OpenTelemetry Collector in DotNet
True Cloud Native Batch Workflow for .NET with MicroBatchFramework
Pythonで始めるWebアプリケーション開発
第9回rest勉強会 ダウンロード・アップロード編
Metaprogramming Universe in C# - 実例に見るILからRoslynまでの活用例
.NET Core 5 ~ Windows, Linux, OS X そして Docker まで ~
MagicOnion~C#でゲームサーバを開発しよう~
Unityによるリアルタイム通信とMagicOnionによるC#大統一理論の実現
Idcfクラウド 初心者の事始め(2)資料
The Next Generation for C# Developers
Bicep + VS Code で楽々Azure Deploy
UniRx - Reactive Extensions for Unity
asm.jsとWebAssemblyって実際なんなの?
デモで楽しむ Visual Studio 2022 & .NET 6 最新アップデート
Linux & Mac OS でも動く! ~ オープンソース & クロスプラットフォーム .NET の歩き方 ~
The Twelve-Factor (A|M)pp with C#
emscriptenでC/C++プログラムをwebブラウザから使うまでの難所攻略
Ad

Viewers also liked (20)

PPTX
Get more than a cache back! The Microsoft Azure Redis Cache (NDC Oslo)
PDF
Getting Started with Redis
PPTX
Redis Developers Day 2015 - Secondary Indexes and State of Lua
PDF
Use Redis in Odd and Unusual Ways
PDF
Build a Geospatial App with Redis 3.2- Andrew Bass, Sean Yesmunt, Sergio Prad...
PDF
UV logic using redis bitmap
PDF
HIgh Performance Redis- Tague Griffith, GoPro
PPTX
RedisConf 2016 talk - The Redis API: Simple, Composable, Powerful
PPTX
Using Redis as Distributed Cache for ASP.NET apps - Peter Kellner, 73rd Stre...
PDF
Troubleshooting Redis- DaeMyung Kang, Kakao
PDF
Scalable Streaming Data Pipelines with Redis
PDF
Cloud Foundry for Data Science
PDF
Back your App with MySQL & Redis, the Cloud Foundry Way- Kenny Bastani, Pivotal
PPTX
Redis & MongoDB: Stop Big Data Indigestion Before It Starts
PDF
March 29, 2016 Dr. Josiah Carlson talks about using Redis as a Time Series DB
PDF
Redis High availability and fault tolerance in a multitenant environment
PPTX
Benchmarking Redis by itself and versus other NoSQL databases
PDF
Postgres & Redis Sitting in a Tree- Rimas Silkaitis, Heroku
PDF
Leveraging Probabilistic Data Structures for Real Time Analytics with Redis M...
PDF
Redis acc 2015_eng
Get more than a cache back! The Microsoft Azure Redis Cache (NDC Oslo)
Getting Started with Redis
Redis Developers Day 2015 - Secondary Indexes and State of Lua
Use Redis in Odd and Unusual Ways
Build a Geospatial App with Redis 3.2- Andrew Bass, Sean Yesmunt, Sergio Prad...
UV logic using redis bitmap
HIgh Performance Redis- Tague Griffith, GoPro
RedisConf 2016 talk - The Redis API: Simple, Composable, Powerful
Using Redis as Distributed Cache for ASP.NET apps - Peter Kellner, 73rd Stre...
Troubleshooting Redis- DaeMyung Kang, Kakao
Scalable Streaming Data Pipelines with Redis
Cloud Foundry for Data Science
Back your App with MySQL & Redis, the Cloud Foundry Way- Kenny Bastani, Pivotal
Redis & MongoDB: Stop Big Data Indigestion Before It Starts
March 29, 2016 Dr. Josiah Carlson talks about using Redis as a Time Series DB
Redis High availability and fault tolerance in a multitenant environment
Benchmarking Redis by itself and versus other NoSQL databases
Postgres & Redis Sitting in a Tree- Rimas Silkaitis, Heroku
Leveraging Probabilistic Data Structures for Real Time Analytics with Redis M...
Redis acc 2015_eng
Ad

More from Yoshifumi Kawai (20)

PDF
A quick tour of the Cysharp OSS
PDF
A Brief History of UniRx/UniTask, IUniTaskSource in Depth
PDF
Building the Game Server both API and Realtime via c#
PDF
ライブラリ作成のすゝめ - 事例から見る個人OSS開発の効能
PDF
Unity C#と.NET Core(MagicOnion) C# そしてKotlinによるハーモニー
PDF
Deep Dive async/await in Unity with UniTask(EN)
PDF
The Usage and Patterns of MagicOnion
PDF
Memory Management of C# with Unity Native Collections
PDF
Deep Dive async/await in Unity with UniTask(UniRx.Async)
PDF
CEDEC 2018 最速のC#の書き方 - C#大統一理論へ向けて性能的課題を払拭する
PDF
Binary Reading in C#
PDF
「黒騎士と白の魔王」gRPCによるHTTP/2 - API, Streamingの実践
PPTX
RuntimeUnitTestToolkit for Unity(English)
PPTX
RuntimeUnitTestToolkit for Unity
PDF
NextGen Server/Client Architecture - gRPC + Unity + C#
PDF
How to make the Fastest C# Serializer, In the case of ZeroFormatter
PDF
ZeroFormatterに見るC#で最速のシリアライザを作成する100億の方法
PDF
ZeroFormatter/MagicOnion - Fastest C# Serializer/gRPC based C# RPC
PDF
What, Why, How Create OSS Libraries - 過去に制作した30のライブラリから見るC#コーディングテクニックと個人OSSの...
PDF
Photon Server Deep Dive - View from Implmentation of PhotonWire, Multiplayer ...
A quick tour of the Cysharp OSS
A Brief History of UniRx/UniTask, IUniTaskSource in Depth
Building the Game Server both API and Realtime via c#
ライブラリ作成のすゝめ - 事例から見る個人OSS開発の効能
Unity C#と.NET Core(MagicOnion) C# そしてKotlinによるハーモニー
Deep Dive async/await in Unity with UniTask(EN)
The Usage and Patterns of MagicOnion
Memory Management of C# with Unity Native Collections
Deep Dive async/await in Unity with UniTask(UniRx.Async)
CEDEC 2018 最速のC#の書き方 - C#大統一理論へ向けて性能的課題を払拭する
Binary Reading in C#
「黒騎士と白の魔王」gRPCによるHTTP/2 - API, Streamingの実践
RuntimeUnitTestToolkit for Unity(English)
RuntimeUnitTestToolkit for Unity
NextGen Server/Client Architecture - gRPC + Unity + C#
How to make the Fastest C# Serializer, In the case of ZeroFormatter
ZeroFormatterに見るC#で最速のシリアライザを作成する100億の方法
ZeroFormatter/MagicOnion - Fastest C# Serializer/gRPC based C# RPC
What, Why, How Create OSS Libraries - 過去に制作した30のライブラリから見るC#コーディングテクニックと個人OSSの...
Photon Server Deep Dive - View from Implmentation of PhotonWire, Multiplayer ...

RespClient - Minimal Redis Client for PowerShell