<div dir="ltr">Sorry for my late reply to this thread, I've was side tracked with a few other issues but I'm back on track now. <div>I don't have much to report at the moment except to share the branch we are working on for the different database options, and how to run/configure them if anyone would like to try them out. <div>
<span style="color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;line-height:25px">We are currently looking into what store will be the best fit for our SimplePush Server and are trying three types of databases, MySql (JPA), Redis, and CouchDB in this </span><a href="https://github.com/danbev/aerogear-simplepush-server/tree/no-sql-databases" rel="noreferrer" style="font-family:Helvetica,arial,freesans,clean,sans-serif;line-height:25px;color:rgb(65,131,196);text-decoration:none">branch</a><span style="color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;line-height:25px">.</span><br>
</div><div><p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;line-height:25px">Using the above branch one can try the different database by making changes to the AS7/WildFly configuration (standalone.xml in most cases).<br>
For example, to use a JPA database one would use:</p><div class="" style="border:0px;padding:0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15px;line-height:25px"><pre style="font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:13px;line-height:19px;margin-top:15px;margin-bottom:15px;background-color:rgb(248,248,248);border:1px solid rgb(221,221,221);overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">
<span class="" style="color:navy"><subsystem</span> <span class="" style="color:teal">xmlns=</span><span class="" style="color:rgb(221,17,68)">"urn:org.jboss.aerogear.simplepush:1.0"</span><span class="" style="color:navy">></span>
<span class="" style="color:navy"><server</span> <span class="" style="color:teal">socket-binding=</span><span class="" style="color:rgb(221,17,68)">"simplepush"</span> <span class="" style="color:teal">token-key=</span><span class="" style="color:rgb(221,17,68)">"changeMe!"</span> <span class="" style="color:teal">notification-tls=</span><span class="" style="color:rgb(221,17,68)">"false"</span> <span class="" style="color:teal">sockjs-tls=</span><span class="" style="color:rgb(221,17,68)">"false"</span><span class="" style="color:navy">></span>
<span class="" style="color:navy"><datastore></span>
<span class="" style="color:navy"><jpa</span> <span class="" style="color:teal">datasource-jndi-name=</span><span class="" style="color:rgb(221,17,68)">"java:jboss/datasources/SimplePushDS"</span> <span class="" style="color:teal">persistence-unit=</span><span class="" style="color:rgb(221,17,68)">"SimplePushPU"</span><span class="" style="color:navy">/></span>
<span class="" style="color:navy"></datastore></span>
<span class="" style="color:navy"></server></span>
<span class="" style="color:navy"></subsystem></span>
</pre></div><p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15px;line-height:25px">To use Redis:</p><div class="" style="border:0px;padding:0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15px;line-height:25px">
<pre style="font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:13px;line-height:19px;margin-top:15px;margin-bottom:15px;background-color:rgb(248,248,248);border:1px solid rgb(221,221,221);overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">
<span class="" style="color:navy"><subsystem</span> <span class="" style="color:teal">xmlns=</span><span class="" style="color:rgb(221,17,68)">"urn:org.jboss.aerogear.simplepush:1.0"</span><span class="" style="color:navy">></span>
<span class="" style="color:navy"><server</span> <span class="" style="color:teal">socket-binding=</span><span class="" style="color:rgb(221,17,68)">"simplepush"</span> <span class="" style="color:teal">token-key=</span><span class="" style="color:rgb(221,17,68)">"changeMe!"</span> <span class="" style="color:teal">notification-tls=</span><span class="" style="color:rgb(221,17,68)">"false"</span> <span class="" style="color:teal">sockjs-tls=</span><span class="" style="color:rgb(221,17,68)">"false"</span><span class="" style="color:navy">></span>
<span class="" style="color:navy"><datastore></span>
<span class="" style="color:navy"><redis</span> <span class="" style="color:teal">host=</span><span class="" style="color:rgb(221,17,68)">"localhost"</span> <span class="" style="color:teal">port=</span><span class="" style="color:rgb(221,17,68)">"6379"</span><span class="" style="color:navy">/></span>
<span class="" style="color:navy"></datastore></span>
<span class="" style="color:navy"></server></span>
<span class="" style="color:navy"></subsystem></span>
</pre></div><p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15px;line-height:25px">To use CouchDB:</p><div class="" style="border:0px;padding:0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;line-height:25px">
<pre style="font-size:13px;font-family:Consolas,'Liberation Mono',Courier,monospace;line-height:19px;margin-top:15px;margin-bottom:15px;background-color:rgb(248,248,248);border:1px solid rgb(221,221,221);overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">
<span class="" style="color:navy"><subsystem</span> <span class="" style="color:teal">xmlns=</span><span class="" style="color:rgb(221,17,68)">"urn:org.jboss.aerogear.simplepush:1.0"</span><span class="" style="color:navy">></span>
<span class="" style="color:navy"><server</span> <span class="" style="color:teal">socket-binding=</span><span class="" style="color:rgb(221,17,68)">"simplepush"</span> <span class="" style="color:teal">token-key=</span><span class="" style="color:rgb(221,17,68)">"changeMe!"</span> <span class="" style="color:teal">notification-tls=</span><span class="" style="color:rgb(221,17,68)">"false"</span> <span class="" style="color:teal">sockjs-tls=</span><span class="" style="color:rgb(221,17,68)">"false"</span><span class="" style="color:navy">></span>
<span class="" style="color:navy"><datastore></span>
<span class="" style="color:navy"><couchdb</span> <span class="" style="color:teal">url=</span><span class="" style="color:rgb(221,17,68)">"<a href="http://127.0.0.1:5984">http://127.0.0.1:5984</a>"</span> <span class="" style="color:teal">database-name=</span><span class="" style="color:rgb(221,17,68)">"simplepush"</span><span class="" style="color:navy">/></span>
<span class="" style="color:navy"></datastore></span>
<span class="" style="color:navy"></server></span>
<span class="" style="color:navy"></subsystem></span>
</pre><div>I'm writing a gist describing how data is stored with Redis and CouchDB and will post back here when it's done to get feedback. </div></div></div><div><br></div></div></div><div class="gmail_extra"><br>
<br><div class="gmail_quote">On 26 September 2013 17:15, JR Conlin <span dir="ltr"><<a href="mailto:jrconlin@gmail.com" target="_blank">jrconlin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm not familiar with Hibernate, but I'm a HUGE advocate of abstraction<br>
at functional levels. (e.g. classic MVC designs). Generally, what's good<br>
today may not be good tomorrow, and having unencumbered interfaces lets<br>
you swap in what makes the most amount of sense with the least impact to<br>
your code.<br>
<br>
The nice thing about Key/value is that you've got the most amount of<br>
flexibility around what you actually use to store data; Postgres, MySQL,<br>
Redis, Memcache, heck an in memory hash can all do it.<br>
<br>
As for which data store you actually use, that's kinda driven by what<br>
you expect your load to be. If you're only talking a few thousand<br>
clients with a dozen channels, each getting an update when a flights<br>
status changes, then you're not talking about putting a huge strain on<br>
your storage or it's Read/Write capacity. If you've got a few hundred<br>
million clients and some partners who've decided to use your system as<br>
part of their FPS game updates, then you've got lots more problems.<br>
<br>
(And now you start to understand why I wake up in a cold sweat screaming<br>
about how you don't use SimplePush for real time stock quotes.)<br>
<div class="HOEnZb"><div class="h5"><br>
On 2013/9/26 2:50 AM, Karel Piwko wrote:<br>
> No reason to push for Mongo then, my experience with NoSQL databases (not<br>
> counting XML databases) is pretty limited and I'm glad you gave me some insight.<br>
><br>
> What about abstraction layer idea based on Hibernate OGM? Does it make any<br>
> sense to you? Currently is does support only Infinispan, EHCache and MongoDB<br>
> [1], so I guess it's out of question as well.<br>
><br>
> Karel<br>
><br>
><br>
> [1]<br>
> <a href="http://docs.jboss.org/hibernate/ogm/4.0/reference/en-US/html/ogm-datastore-providers.html" target="_blank">http://docs.jboss.org/hibernate/ogm/4.0/reference/en-US/html/ogm-datastore-providers.html</a><br>
><br>
> On Wed, 25 Sep 2013 17:59:10 -0300<br>
> Douglas Campos <<a href="mailto:qmx@qmx.me">qmx@qmx.me</a>> wrote:<br>
><br>
>> On Wed, Sep 25, 2013 at 09:53:19AM -0700, JR Conlin wrote:<br>
>>> The concern with using Mongo is that it's very lossy and fairly<br>
>>> unreliable as a data store for a number of reasons. (It's fine for<br>
>>> simple, low demand systems, but has complications once you really start<br>
>>> to hammer on it.)<br>
>>><br>
>>> <a href="http://blog.schmichael.com/2011/11/05/failing-with-mongodb/" target="_blank">http://blog.schmichael.com/2011/11/05/failing-with-mongodb/</a><br>
>>> <a href="http://blog.engineering.kiip.me/post/20988881092/a-year-with-mongodb" target="_blank">http://blog.engineering.kiip.me/post/20988881092/a-year-with-mongodb</a><br>
>>> etc.<br>
>>><br>
>>> I'd suggest sticking with other DBs unless you're ok with loss or don't<br>
>>> plan on heavily exercising it.<br>
>> Seconded, have had severe data loss with mongo under high load at my<br>
>> previous job<br>
>><br>
> _______________________________________________<br>
> aerogear-dev mailing list<br>
> <a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
<br>
_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
</div></div></blockquote></div><br></div>