Needed - Comet table

51 views
Skip to first unread message

Donald McLean

unread,
Apr 5, 2016, 4:43:10 PM4/5/16
to liftweb
Up to this point I've been using the JQuery plugin DataTables. It's a good piece of software, but it has limitations.

So does anyone have an implementation of a table where the data model is maintained on the server and the client gets real-time-ish updates via comet? With sorting and filtering?

Thanks,

Donald

Diego Medina

unread,
Apr 5, 2016, 11:53:18 PM4/5/16
to Lift
Hi Donald,

Many years ago I wrote this
which was about a grid like page that needed to get updates to individual cells. Those updates were done using comet.
It was just like a table, so maybe you can use some of that code. I didn't do any filtering or sorting though.
Also note that after I wrote that, we added the https://github.com/lift/framework/blob/master/web/webkit/src/main/scala/net/liftweb/http/NamedCometListener.scala and related files to Lift itself, I changed the names of some of the files bu the idea was the same. (this later part is only needed if there is another user or process that triggers the table to update, meaning, it crosses the session boundary).

Hope that helps.

Diego



--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code

---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Diego Medina
Lift/Scala Consultant
di...@fmpwizard.com
http://blog.fmpwizard.com/

Donald McLean

unread,
Apr 7, 2016, 12:56:45 PM4/7/16
to liftweb
Thanks, Diego.

While that's certainly a step in the right direction, it's far from what I am looking for. I guess I'll have to write something myself.

I was thinking of something more general purpose, where the developer supplies a few things, and the widget handles it:

1. A bunch of data, perhaps through a model implementing some trait

2. A high level format (# columns, appearance of table, columns, and rows), perhaps through several models implementing various traits

3. An API for wiring in controls (sorting, filtering, custom implemented with messages to data model)

4. A messaging protocol for the data model to notify the table when a change occurs so that a comet update can go to the client

I would seriously welcome any thought or suggestions here.

Thanks,

Donald

On Tue, Apr 5, 2016 at 11:53 PM, Diego Medina <di...@fmpwizard.com> wrote:

Hi Donald,

Many years ago I wrote this
which was about a grid like page that needed to get updates to individual cells. Those updates were done using comet.
It was just like a table, so maybe you can use some of that code. I didn't do any filtering or sorting though.
Also note that after I wrote that, we added the https://github.com/lift/framework/blob/master/web/webkit/src/main/scala/net/liftweb/http/NamedCometListener.scala and related files to Lift itself, I changed the names of some of the files bu the idea was the same. (this later part is only needed if there is another user or process that triggers the table to update, meaning, it crosses the session boundary).

Antonio Salazar Cardozo

unread,
Apr 7, 2016, 3:04:48 PM4/7/16
to Lift
This sounds like something that Angular probably provides… Or that there
is an Angular component for. If that's the case, you can probably try hooking
it up with lift-angular, which I gather is a pretty good integration.

Don't know much more than that, though, I'm afraid. I don't think it should be
too hard to integrate into existing client-side data-driven tables, but I also
haven't really used many such libraries.
Thanks,
Antonio

Donald McLean

unread,
Apr 7, 2016, 6:51:24 PM4/7/16
to liftweb
Hi Antonio,

I'm really confused - when you say "lift-angular", what do you mean?

Thanks,

Donald

Antonio Salazar Cardozo

unread,
Apr 9, 2016, 9:34:34 AM4/9/16
to Lift
This library: https://github.com/joescii/lift-ng

Also, at risk of sounding impatient, it's the first result on google for the search "lift-angular", though on the other hand I misremembered the name :)
Thanks,
Antonio

Donald McLean

unread,
Apr 11, 2016, 7:37:07 AM4/11/16
to lif...@googlegroups.com
Thanks, Antonio.

I figured that's what you meant, but since that wasn't what you said, I just wanted to be sure.

Sent from my iPad

Antonio Salazar Cardozo

unread,
Apr 11, 2016, 9:03:30 PM4/11/16
to Lift
Got it :) Joe, the author, is a Lift committer and hangs around a good bit,
so if you have any questions just give a shout and hopefully he'll be able
to help!
Thanks,
Antonio
> To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe@googlegroups.com.

Joe Barnes

unread,
Apr 16, 2016, 11:04:30 AM4/16/16
to Lift
Donald,

Definitely let us know if you try lift-ng and have any questions.  I hit a busy spell the past 3 or 4 weeks, so I've been a bit behind here on the ML. We've been using it to build partquest.com with a lot of success.  If client-side rendering and view-first development makes sense for your project, the Lift/Angular1 combo is quite powerful.

Joe
> To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.

Donald McLean

unread,
Apr 18, 2016, 8:21:09 AM4/18/16
to liftweb
Hi Joe,

Thanks for reply.

As a matter of fact, it is the client side rendering that I think will be a problem. There are times when the model contains tens of thousands of records, sometimes as many as 150,000, and just transmitting the data to the client will crash the browser (yes, I tried it, just to see what would happen).

Unless there's another suggestion, it looks like I might have to write something myself, more or less from scratch.

Since I have different pages that all have the same problem, but have different data models, I'm thinking about doing something generic, as a Lift extension/library component.
--
Family photographs are a critical legacy for
ourselves and our descendants. Protect that
legacy with a digital backup and recovery plan.

Joe Barnes

unread,
Apr 18, 2016, 10:24:03 AM4/18/16
to lif...@googlegroups.com
Wow, yeah that's a lot of data.  I would do some type of paging solution for that, regardless of where you render..

Joe


You received this message because you are subscribed to a topic in the Google Groups "Lift" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/liftweb/tB2Ey5BokQ4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to liftweb+u...@googlegroups.com.

Antonio Salazar Cardozo

unread,
Apr 18, 2016, 2:00:03 PM4/18/16
to Lift
For what it's worth, there are Angular components built for this; e.g.

Integrating all of that into Lift would be cool, of course, but it feels
like many of these components are already pretty generic. Either
way, look forward to what you come up with if you decide to build it
yourself :)
Thanks,
Antonio
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Family photographs are a critical legacy for
ourselves and our descendants. Protect that
legacy with a digital backup and recovery plan.

--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code

---
You received this message because you are subscribed to a topic in the Google Groups "Lift" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/liftweb/tB2Ey5BokQ4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to liftweb+unsubscribe@googlegroups.com.

Peter Petersson

unread,
Apr 18, 2016, 4:36:21 PM4/18/16
to lif...@googlegroups.com
And there is also Angular UI Grid [1] although it "only" performs well with 10,000+ rows

[1] http://ui-grid.info/

best regards Peter Petersson
Reply all
Reply to author
Forward
0 new messages