O slideshow foi denunciado.
Seu SlideShare está sendo baixado. ×

Introducing the Geode Native Client

Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Carregando em…3
×

Confira estes a seguir

1 de 23 Anúncio

Mais Conteúdo rRelacionado

Diapositivos para si (20)

Semelhante a Introducing the Geode Native Client (20)

Anúncio

Mais de VMware Tanzu (20)

Mais recentes (20)

Anúncio

Introducing the Geode Native Client

  1. 1. Introducing the Geode Native Client Blake Bender & Charlie Black - Pivotal
  2. 2. Who? Blake Bender Apache Geode Native Client Anchor 2 Charlie Black Apache Geode Product Manager
  3. 3. Agenda ● Background on Geode Native Client ● Features ● Use Cases ● Pivotal steeltoe ● Coding Examples ● Q&A We are available after the talk! 3
  4. 4. Some History 4 ● Before Pivotal donated the code we modernized it to C++11 ● Dec 2018 First Official Geode Native Client Release - Geode 1.8.0 ● Oct 2019 First Summit Appearance!!! ● If you want to be a code committer: ○ Interesting: C++ code base was going to be server
  5. 5. Features at a Glance 5 Same awesome feature set as the Java Client presented in C++, C# and soon to be NodeJS ● Connection Pooling ● Data Aware for Single Hop Data Access ● Events - ALL, Key Based, and “Where” Predicate ● Durable Client Subscriptions ● Function - Execute your business logic next to data ● Transactions ● … Wait for it …
  6. 6. Features - PLUS 6 You can access more then one system in a given process!!!
  7. 7. Deployment Architecture 7 Application/Client Apache Geode Server
  8. 8. Use Case ● Rich Desktop Application ● Backing Service to a 12 Factor App ● Enterprise Integration Patterns ● … 8
  9. 9. Use Case ● Anywhere this Icon appears in a Architecture ● Sometimes this Icon 9 Database Queue
  10. 10. Steeltoe ● Steeltoe provides simpler ways to build cloud-native .NET microservices. ● Steeltoe Connectors simplify the process of connecting and using services on Cloud Foundry. ● Geode Steeltoe Connector is in 2.3.0 10 Service Connectors for
  11. 11. What would I have to do? …"locators": [ "locator1[55221],locator2[55221]" ], "users": [ { "password": ”******", "roles": [ "developer" ], "username": "developer_IGSCs4jepdKTUypXkhmA" } ],… 11 Service Connectors for
  12. 12. Learn More about Steeltoe 12
  13. 13. What Does it Look Like – code examples 13
  14. 14. Geode Native Prerequisites for .net ● Windows 10-based OS - Windows 2016 server, Windows 10 desktop ● Visual Studio 2015 (we build/test with Community Edition) ● Geode Native library (build from sources) 14
  15. 15. Items you’ll collect along the way ● A Cache - create from a CacheFactory ● A Pool - create from a PoolFactory, obtained from Cache ● A Region - create from RegionFactory, obtained from Cache, OR get via Cache.GetRegion() if it already exists 15
  16. 16. Creating a Cache ... using System; using Apache.Geode.Client; ... var cacheFactory = new CacheFactory() .Set("log-level", "none"); var cache = cacheFactory.Create(); ... 16
  17. 17. Creating a Pool ... var poolFactory = cache.GetPoolFactory() .AddLocator("localhost", 10334); poolFactory.Create("pool"); … 17
  18. 18. Creating a Region ... var regionFactory = cache.CreateRegionFactory(RegionShortcut.PROXY) .SetPoolName("pool"); var region = regionFactory.Create<string, string>("example_userinfo"); … 18
  19. 19. Put/Get Values … const string rtimmonsKey = "rtimmons"; const string rtimmonsValue = "Robert Timmons"; const string scharlesKey = "scharles"; const string scharlesValue = "Sylvia Charles"; region.Put(rtimmonsKey, rtimmonsValue); region.Put(scharlesKey, scharlesValue); var user1 = region.Get(rtimmonsKey); var user2 = region.Get(scharlesKey); … 19
  20. 20. About Those Values... ● Values in a Geode cache can be a wide variety of things - various numeric types, strings, arrays, PDX or DataSerializable objects, etc. ● Keys can also be almost anything you like. ● Choose wisely! 20
  21. 21. Issuing a Query … Console.WriteLine("Getting the orders from the region"); var query = queryService.NewQuery<Order>("SELECT * FROM /custom_orders WHERE quantity > 30"); var queryResults = query.Execute(); Console.WriteLine("The following orders have a quantity greater than 30:"); foreach (Order value in queryResults) { Console.WriteLine(value.ToString()); } … 21
  22. 22. Advanced(ish) Usage ● Multiple Regions ● Custom objects for values (or keys) ● Function execution ● ContinuousQuery ● CacheListener ● PersistenceManager ● Security 22
  23. 23. Thanks For Listening: Project: https://github.com/apache/geode-native OWIN Example: https://youtu.be/0wSOVdNdQOc 23

×